﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class WorkTime_WorkTimeLeaveList : System.Web.UI.Page
{
    private Srvtools.WebDataSet WMaster;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            InitializeComponent();
            Master.DataSource = WMaster;

        }
        ClientQuery.Show(Panel1);

        MasterPage_MasterPage mpg = (MasterPage_MasterPage)this.Page.Master;
        mpg.HelpHref = "~/Help/WorkTime/员工请假列表.htm";
        mpg.PageName = "请假列表";
        mpg.PicUrl = "";
        mpg.IntiBar();
    }

    private void InitializeComponent()
    {
        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WorkTime_WorkTimeLeaveList));
        this.WMaster = new Srvtools.WebDataSet();
        ((System.ComponentModel.ISupportInitialize)(this.WMaster)).BeginInit();
        // 
        // WMaster
        // 
        this.WMaster.Active = true;
        this.WMaster.AlwaysClose = false;
        this.WMaster.DeleteIncomplete = true;
        this.WMaster.Guid = "fba9f6bd-1706-46c4-96fe-15ffd55d6e3f";
        this.WMaster.LastKeyValues = null;
        this.WMaster.PacketRecords = 100;
        this.WMaster.Position = -1;
        this.WMaster.RemoteName = "SWorkTime.View_WorkTime_Leave";
        this.WMaster.ServerModify = false;
        ((System.ComponentModel.ISupportInitialize)(this.WMaster)).EndInit();

    }


    public override void DataBind()
    {
        //base.DataBind();
        wgvMaster.DataBind();
    }

    protected void WebNavigator1_Command(object sender, CommandEventArgs e)
    {
        if (e.CommandName == "cmdClientQuery")
        {

            //Detail.ExecuteAdd(wfvMaster);
            ClientQuery.Execute();


        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {

        ClientQuery.Execute(Panel1);
        DataBind();

    }
    protected void Button2_Click(object sender, EventArgs e)
    {

        ClientQuery.Clear(Panel1);
        Master.DataBind();
        wgvMaster.DataBind();

    }

    //protected void Button3_Click(object sender, EventArgs e)
    // {
    // if (WebDropDownList1.SelectedIndex >= 0)
    // {
    //     Master.SetWhere(" WorkTime_Leave.LeaveTypeId = " + WebDropDownList1.SelectedValue);
    //     Master.DataBind();
    //     wgvMaster.DataBind();
    // }
    //}

}
